/*

案例1:(数值拆分)
    键盘输入一个三位数的整数,
    打印出个位,十位,和百位数字.
 */
package com.itheima.day02;

import java.util.Scanner;

public class TestClassCase01 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个三位数:");
        int num=sc.nextInt();

        int ge  = num%10;
        int shi = num/10%10;
        int bai = num/100%10;
        //int bai = num/100;
        

        System.out.println("整数"+num+"个位为:"+ge);
        System.out.println("整数"+num+"十位为:"+shi);
        System.out.println("整数"+num+"百位为:"+bai);
    }
}
